
import { onMounted,inject,toRef } from 'vue'
import  useWebsiteStore  from '@/store/websiteStore'



const useWebsites = () => {
    const websiteStore = useWebsiteStore()
    const { setKeywords,keywords } = inject('searchbar-keywords')

    // const injectObj = inject('searchbar-keywords')
    // const keywords = toRef(injectObj,'keywords')

    onMounted(() => {
        websiteStore.init()
    })

    return {
        websiteStore,
        keywords
    }

}

export default useWebsites